<template>
  <div>
    <div>账号切换</div>
    <button @click="wjl()" type="default" size="mini">王经理</button>
    <button @click="lrsjl()" type="default" size="mini">李人事经理</button>
    <!-- <button @click="zzjl()" type="default" size="mini">张总经理</button> -->
    <button @click="zzjl()" type="default" size="mini">张三</button>
    <button @click="lisi()" type="default" size="mini">李四</button>
    <div>当前token：{{ token }}</div>
  </div>
</template>

<script>
export default {
  name: "Test",

  data() {
    return {
      token: ''
    };
  },

  created(){
    this.token = window.localStorage.getItem('token')
  },

  methods: {
    wjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLM0MzIzNLUw0lEqLU4t8kxRsoIy8xJzU4FayrNycnKUagHmgIwDQgAAAA.k5dP65AJeuCnP5GAPuOQPE-sqSeDrXEjOMYlvMttPIulD1zCNzJfgRwrbq4eqByMZOAHLGEvMOaGzsQKbO_pNg'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lrsjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLM0MzIzNDc30lEqLU4t8kxRsjKGMPMSc1OBWnKKirNylGoBWcXtdEIAAAA.Vr-idfaBsLUcgdsKc8BLLV2Oh0fBv_bSypCiM2TnMHgXs-i6x0yo7vhniEqC7RDq4wzf1WOqk4ETMsAHd8X9-g'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    zzjl() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLM0MzIzMjI21VEqLU4t8kxRsjKHMPMSc1OBWqoyEvPSixPzlGoBMuP1YkUAAAA.t0ad6-9HYGNHxiJfpgDQ7Uj-xcmHB1dOCCm4waaLWjns11TSm65JmeZ0IcoRXGcb83MgqBbZD-G0eB5kdgkveQ'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    },

    lisi() {
      window.localStorage.setItem('token', '');
      let token = 'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNLM0MzIztDCw0FEqLU4t8kxRsjKBMPMSc1OBWnIyizOVagHQ1TwMQQAAAA.63tX_S4Y8uVG9xklAWaehv4aW5bTAd9FLwSWfg284DrbWM8M6UKpTKrqityUqy9qQYxgaraw-GHdnYBjnDkdrg'
      window.localStorage.setItem('token', token);
      this.token = window.localStorage.getItem('token')
    }
  }
}
</script>
